from langchain_openai import ChatOpenAI

from tcm_sense_chat.common_utils import get_env


class QwenModel:

    @staticmethod
    def _get_model():
        return ChatOpenAI(
            api_key=get_env("TONGYI_API_KEY"),
            base_url=get_env("TONGYI_BASE_URL"),
            model=get_env("TONGYI_MODEL_NAME"),
        )

get_qwen_model = QwenModel._get_model

if __name__ == '__main__':
    print(get_qwen_model())
